//
//  HWLocallyStoredData.m
//  HWanGame
//
//  Created by 陈道斌 on 2019/11/4.
//  Copyright © 2019 Chendaobin. All rights reserved.
//

#import "HWLocallyStoredData.h"

@implementation HWLocallyStoredData

// 取出登录UserID
+ (NSString *)getLoginUserID {
    
    if (nil != [[NSUserDefaults standardUserDefaults] objectForKey:@"userID"]) {
           return [[NSUserDefaults standardUserDefaults] objectForKey:@"userID"];
       }else{
           return @"";
       }
    
    
}


// 设置UIserID
+ (void)setUserID:(NSString *)userID {
    
      NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
      [defaults setObject:userID forKey:@"userID"];
      [defaults synchronize];

}



+ (NSString *)getAccount {
    
    if (nil != [[NSUserDefaults standardUserDefaults] objectForKey:@"account"]) {
            
        return [[NSUserDefaults standardUserDefaults] objectForKey:@"account"];
         
    }else{
             return @"";
    }
      
    
    
}

+ (void)setUserName:(NSString *)userName {
    
      NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
      [defaults setObject:userName forKey:@"userName"];
      [defaults synchronize];

    
}

+ (NSString *)getUserName {
    
    if (nil != [[NSUserDefaults standardUserDefaults] objectForKey:@"userName"]) {
            
        return [[NSUserDefaults standardUserDefaults] objectForKey:@"userName"];
         
    }else{
             return @"";
    }
      
    
    
}

+ (void)setUserFace:(NSString *)userFace {
    
      NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
      [defaults setObject:userFace forKey:@"userFace"];
      [defaults synchronize];

    
}

+ (NSString *)getUserFace {
    
    if (nil != [[NSUserDefaults standardUserDefaults] objectForKey:@"userFace"]) {
            
        return [[NSUserDefaults standardUserDefaults] objectForKey:@"userFace"];
         
    }else{
             return @"";
    }
      
    
    
}

+ (void)setAccount:(NSString *)account {
    
      NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
      [defaults setObject:account forKey:@"account"];
      [defaults synchronize];

    
}


+ (NSString *)getCode {
    
     if (nil != [[NSUserDefaults standardUserDefaults] objectForKey:@"coid"]) {
              
          return [[NSUserDefaults standardUserDefaults] objectForKey:@"coid"];
           
      }else{
               return @"";
      }

    
}

+ (void)setCode:(NSString *)code  {
    
    
    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
    [defaults setObject:code forKey:@"coid"];
        [defaults synchronize];
    
}


// 记录 是否需要微信 和 QQ 登录
+(NSString *)getLogQQAndWeichat {
    
    
    
    
      if (nil != [[NSUserDefaults standardUserDefaults] objectForKey:@"QQAndWeichat"]) {
          
            return [[NSUserDefaults standardUserDefaults] objectForKey:@"QQAndWeichat"];
          
    
       }else{
               
           
           return @"";
      
        
      }


}

+(void)setLogQQAndWeichat:(NSString *)logQQAndWeichat  {
    
    
    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
    [defaults setObject:logQQAndWeichat forKey:@"QQAndWeichat"];
    [defaults synchronize];
    
    
    
    
    
    
}



@end
